package com.zhanghu.backendZray.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author ZhangDong
 * @date 2024/9/10 9:36
 */
@Data
public class BaseEntity {
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Integer createId;

    @TableField(value = "update_id", fill = FieldFill.INSERT_UPDATE)
    private Integer updateId;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    // 秒级
    @TableLogic(value = "0", delval = "UNIX_TIMESTAMP(CURRENT_TIMESTAMP)")
    private Long deleteAt;
}
